<template>
  <div>
    <button @click="index">返回首页</button>
    <div>
      <div v-for="item, index in list" :key="index">姓名:{{ item.name }} 年龄:{{ item.age }}</div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      list: [
        { name: 'List', age: "22", },
        { name: 'zs', age: "18", },
        { name: 'ww', age: "11", },
        { name: 'ss', age: "21", },
      ]
    }
  },
  methods: {
    index () {
      this.$router.push('/')
    },
  },
}
</script>

<style lang="scss" scoped></style>